<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" language="java"%>
<%@ include file="/page/common/taglibs.jsp" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>测试</title>
<script type="text/javascript">

function check(f){
	if(f.value.value.trim() == ""){
		alert('请输入查询值！');
		f.value.focus();
		return false;
	}
	return true;
}

String.prototype.trim = function() 
{ 
	return this.replace(/(^\s*)|(\s*$)/g, ""); 
}

</script>
</head>
<body>
<s:form action="/test/findTest.do" onsubmit="return check(this);">
<table  width="25%" align="center" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC" >
	<tr align="center" height="30"  >
		<td colspan="2">查询</td>
	</tr>
	
		<s:textfield name="testDTO.value" id="value" label="value" />
	
	
		<s:submit value="查询" align="center"></s:submit>
	
</table>
</s:form>
<p></p><p></p>
<div style="text-align:right; margin-right:200px;">
<input type="button" value="新增" onclick="javascript:document.location.href='/hb-intra/test/addPageTest.do'" /> 
</div>
<s:if test="message!=null">
<div style="text-align:left; margin-left:200px;color: red;"><s:property value="message" /></div>
</s:if>
<table  width="60%" align="center" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC" >
	<tr>
		<td align="center">id</td>
		<td align="center">value</td>
	</tr>
	<s:if test="testDTOList != null">
	<s:iterator value="testDTOList" var="test">
		<tr height="10" align="center" valign="middle" bgcolor="#FFFFFF">
			<td align="center"><s:property value="id" /></td>
			<td align="center"><s:property value="value" /> </td>
			<td><a href="/hb-intra/test/updatePageTest.do?id=<s:property value="id" />" >更新</a></td>
			<td><a href="/hb-intra/test/deleteTest.do?id=<s:property value="id"/>" >删除</a></td>
		</tr>
	</s:iterator>
	</s:if>
	<s:else>
		<tr bgcolor="#FFFFFF">
			<td colspan="2">无记录</td>
		</tr>
	</s:else>
</table>
</body>
</html>